<template>
    <div>
      
        <van-nav-bar fixed>
          <van-icon :name="as" color='black' size='40px' slot="left" @click-left="onClickLeft"
          style="display:block;border-radius:50%;overflow:hidden"
          
           />
          <van-tabs v-model="active" color="#ccc" slot="title" @click="onClick">
            <van-tab title="推荐" @click="gotj()" ></van-tab>
            <van-tab title="广场" @click="gogc()" ></van-tab>
          </van-tabs>
          <van-icon name="search" color='black' size='26px' slot="right" @click="onClickRight($event)"/>
      </van-nav-bar>
      <div style="width:100%;height:30px;margin-top:60px" class="ds">
        <span>
          欢迎:
          <a style="color:red">{{name}}</a>
        </span>
      </div>
       <router-view></router-view>
    </div>
</template>

<script>
export default {
    name:'Drill',
  data(){
      return{
        active:0,
      as: this.$store.state.plce,
      name: this.$store.state.name,

      }
  },
  methods:{
    onClickLeft(){

    },
    onClickRight(i){
      console.log(i)
      this.$router.push('/search')
    },
    onClick(index){
      if(index==0){
        this.$router.push('/recommend')
      }
      if(index==1){
        this.$router.push('/square')
      }
    }
  },

}
</script>

<style scoped>
  body,html{background: white}
</style>
